Workshop 2 - RMarkdown

The aim

We want to present the results and the visuals in ways that are easier to share with people. We will knit the RMarkdown file into a PDF or a the webpage, so people can have all the info in one place together (with the code if it is a webpage).

We will create a webpage using RMarkdown and publish it as a GitHub page.

example 1 - Visual models

example 2 - Heating rate

Details

Let’s take a closer look what we can have in a webpage.

2. Table

3. Tabs

4. Code button

Structure and Essentials

As we have mentioned in the last workshop (or not), we suggest you to have some folders to keep everything tidy.

  • data: your data
  • scripts: for the scripts, including .R and .Rmd files
  • docs: for the output
  • images (optional): for the images

Files

There are two files you must have to publish a webpage:

  1. index.html: default homepage
  2. _site.yml: provides the global YAML header for the site

Exercise 1

YAML header

yaml header controls the overall appearance of the page.
See here and here for more details about yaml.